#include "SMPPSarMsgRefNum.hpp"

using namespace smpp::pdu;

SarMsgRefNum::SarMsgRefNum(const quint16 nValue):
TLV(TLVtags::TAG_SAR_MSG_REF_NUM,2),_Value(nValue){}

SarMsgRefNum::SarMsgRefNum(const SarMsgRefNum &nSarMsgRefNum):
TLV(nSarMsgRefNum),_Value(nSarMsgRefNum.getValue()){}

bool SarMsgRefNum::operator ==(const SarMsgRefNum &nSarMsgRefNum) const{
	return (TLV::operator == (nSarMsgRefNum) && 
			_Value == nSarMsgRefNum.getValue());
}

bool SarMsgRefNum::operator !=(const SarMsgRefNum &nSarMsgRefNum) const{
	return !this->operator == (nSarMsgRefNum);
}

SarMsgRefNum &SarMsgRefNum::operator =(const SarMsgRefNum &nSarMsgRefNum){
	if(*this == nSarMsgRefNum)
		return *this;
	TLV::operator = (nSarMsgRefNum);
	_Value = nSarMsgRefNum.getValue();
	return *this;
}

void SarMsgRefNum::setValue(const quint16 nValue){
	_Value = nValue;
}

const quint16 SarMsgRefNum::getValue() const{
	return _Value;
}
